package com.qiantu.phone.utils;

import com.qiantu.api.entity.LinkageBean;
import com.qiantu.api.entity.LinkageNewBean;

/**
 * @ClassName TempDataHolder
 * @Description TODO
 * @Author ShiJunqiang
 * @Date 2021/12/6 20:53
 * @Version 1.0
 */
public class LinkageDataHolder {
    public static void setLinkageData(LinkageBean linkageBean){
        //先清空
        DataHolder.getInstance().clearData("editLinkage");
        DataHolder.getInstance().setData("editLinkage", linkageBean);
    }

    public static LinkageBean getLinkageData(){
        return (LinkageBean) DataHolder.getInstance().getData("editLinkage");
    }

    public static void clearLinkageData(){
        DataHolder.getInstance().clearData("editLinkage");
    }

    public static void setLinkageDataNew(LinkageNewBean linkageBean){
        //先清空
        DataHolder.getInstance().clearData("editLinkageNew");
        DataHolder.getInstance().setData("editLinkageNew", linkageBean);
    }

    public static LinkageNewBean getLinkageDataNew(){
        return (LinkageNewBean) DataHolder.getInstance().getData("editLinkageNew");
    }

    public static void clearLinkageDataNew(){
        DataHolder.getInstance().clearData("editLinkageNew");
    }
}
